<template>
  <el-drawer
    :model-value="modelValue"
    :direction="direction"
    :title="title"
    @close="$emit('update:modelValue', false)"
  >
    <slot></slot>
  </el-drawer>
</template>

<script setup lang="ts" name="ThemeDrawer">
import type { DrawerProps } from "element-plus"
import type { Prop } from "vue"

defineProps({
  modelValue: {
    type: Boolean,
    default: false
  },
  direction: {
    type: String as Prop<DrawerProps["direction"]>,
    default: "rtl"
  },
  title: {
    type: String,
    default: "主题设置"
  }
})
</script>

<style scoped lang="scss"></style>
